package com.zyp.demo.service;

import com.zyp.demo.po.Blog;
import com.zyp.demo.po.BlogQuery;
import javassist.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {
    Blog getBlog(Long id);
    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);
    Page<Blog> listBlog(Pageable pageable);
    Page<Blog> listBlog(Pageable pageable,String query);
    Blog saveBlog(Blog blog);
    Blog updateBlog(Long id,Blog blog) throws NotFoundException;
    void deleteBlog(Long id);
    List<Blog> listRecommendBlogTop(Integer size);

    Blog getAndConvertHtml(Long id) throws NotFoundException;

    Page <Blog> listBlog(Long id, Pageable pageable);

    Map<String,List<Blog>> archiveBlog();

    Long countBlog();
}
